-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEPR: deprecate get_ftype_counts (GH18243) #20404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEPR: deprecate get_ftype_counts (GH18243) #20404
Conversation
Codecov Report
@@ Coverage Diff @@
## master #20404 +/- ##
==========================================
+ Coverage 91.79% 91.85% +0.05%
==========================================
Files 152 152
Lines 49215 49236 +21
==========================================
+ Hits 45179 45225 +46
+ Misses 4036 4011 -25
Continue to review full report at Codecov.
|
@@ -4707,6 +4709,45 @@ def get_ftype_counts(self): | |||
object:dense 1 | |||
dtype: int64 | |||
""" | |||
warnings.warn("get_ftype_counts is deprecated and will " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to create another function here, this is purely user facing (IOW don't create a _get_ftype_counts). keep the doc-string though.
@@ -64,7 +64,7 @@ def test_dtype(self): | |||
assert self.ts.ftypes == 'float64:dense' | |||
tm.assert_series_equal(self.ts.get_dtype_counts(), | |||
Series(1, ['float64'])) | |||
tm.assert_series_equal(self.ts.get_ftype_counts(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just assert the warning here
Hello @GGordonGordon! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on March 27, 2018 at 02:35 Hours UTC |
pandas/core/indexes/base.py
Outdated
@@ -3396,8 +3396,11 @@ def map(self, mapper, na_action=None): | |||
|
|||
def isin(self, values, level=None): | |||
""" | |||
Return a boolean array where the index values are in `values`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know where these changes are coming from? Ideally this PR will just do the deprecation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TomAugspurger - Appears they snuck in with that large pd file under commit 4a43815 (GH20249)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a large file called pd
in your PR that'll need to be deleted (our fault).
Could you try merging master into your branch? We had to do some history rewriting.
________________________________
From: Grant Smith <[email protected]>
Sent: Tuesday, March 20, 2018 6:27:41 PM
To: pandas-dev/pandas
Cc: Tom Augspurger; Mention
Subject: Re: [pandas-dev/pandas] DEPR: deprecate get_ftype_counts (GH18243) (#20404)
@GGordonGordon commented on this pull request.
________________________________
In pandas/core/indexes/base.py<#20404 (comment)>:
@@ -3396,8 +3396,11 @@ def map(self, mapper, na_action=None):
def isin(self, values, level=None):
"""
+ Return a boolean array where the index values are in `values`.
@TomAugspurger<https://github.com/tomaugspurger> - Appears they snuck in with that large pd file under commit 4a43815<4a43815> (GH20249)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#20404 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ABQHIv6jezZu64997O7vdorPS_qujSN2ks5tgZBtgaJpZM4SvfkK>.
|
Deprecate NDFrame.get_ftype_counts()
Code review changes, simplify test case
PEP8 style fix
Revert "DOC: update the Index.isin docstring (pandas-dev#20249)" This reverts commit 4a43815.
4cc2d8c
to
59c4bff
Compare
pandas/core/indexes/base.py
Outdated
@@ -3396,11 +3396,8 @@ def map(self, mapper, na_action=None): | |||
|
|||
def isin(self, values, level=None): | |||
""" | |||
Return a boolean array where the index values are in `values`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert the changes here? Let me know if you need help with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TomAugspurger - I had removed it as you had requested to only have the deprecation code in the branch / PR. So just to clarify you do want this code back in this branch but you don't want that large pr file back in the branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sorry, that's exactly right. We want everything except the large pd
file.
May be easiest to just re-add them manually in a new commit, rather than trying to mess with git.
Revert the revert for just the bases.py file
@TomAugspurger - I've added the bases.py changes back in but left the large pd file out per your request. |
Thanks @GGordonGordon ! |
@TomAugspurger the problem with the big .pd file, was that due to our rewriting of the history? I mean, will each PR that gets updated on master have this problem? (I don't see how you would get it from merging master or rebasing on master) |
I think it was because @GGordonGordon forked this branch from a master that included the big pd file. So anyone who created a branch during that ~7 hours might have the file in their PRs. |
OK, that should be not too many PRs then :) |
Deprecate NDFrame.get_ftype_counts()
git diff upstream/master -u -- "*.py" | flake8 --diff